package cn.gson.springboot.model.pojos;

import java.io.Serializable;

import javax.persistence.*;

import java.util.Date;
import java.util.List;


/**
 * The persistent class for the outpatient_storage database table.
 * 
 */
@Entity
@Table(name="outpatient_storage")
@NamedQuery(name="OutpatientStorage.findAll", query="SELECT o FROM OutpatientStorage o")
public class OutpatientStorage implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="outpatient_storage_id")
	private int outpatientStorageId;

	@Column(name="outpatient_pici")
	private int outpatientPici;

	@Column(name="outpatient_storage_amount")
	private int outpatientStorageAmount;
	
	@Column(name="outpatient_storage_startdate")
	private String  outpatientStorageStartdate;
	
	@Column(name="outpatient_storage_usedate")
	private String  outpatientStorageUsedate;

	//bi-directional many-to-one association to Drug
	@ManyToOne
	@JoinColumn(name="drug_number")
	private Drug drug;

	//bi-directional many-to-one association to Pandian
	@OneToMany(mappedBy="outpatientStorage")
	private List<Pandian> pandians;

	public OutpatientStorage() {
	}

	public int getOutpatientStorageId() {
		return this.outpatientStorageId;
	}

	public void setOutpatientStorageId(int outpatientStorageId) {
		this.outpatientStorageId = outpatientStorageId;
	}

	public int getOutpatientPici() {
		return this.outpatientPici;
	}

	public void setOutpatientPici(int outpatientPici) {
		this.outpatientPici = outpatientPici;
	}

	public int getOutpatientStorageAmount() {
		return this.outpatientStorageAmount;
	}

	public void setOutpatientStorageAmount(int outpatientStorageAmount) {
		this.outpatientStorageAmount = outpatientStorageAmount;
	}

	public Drug getDrug() {
		return this.drug;
	}

	public void setDrug(Drug drug) {
		this.drug = drug;
	}

	public List<Pandian> getPandians() {
		return this.pandians;
	}

	public void setPandians(List<Pandian> pandians) {
		this.pandians = pandians;
	}

	public Pandian addPandian(Pandian pandian) {
		getPandians().add(pandian);
		pandian.setOutpatientStorage(this);

		return pandian;
	}

	public Pandian removePandian(Pandian pandian) {
		getPandians().remove(pandian);
		pandian.setOutpatientStorage(null);

		return pandian;
	}

	public String getOutpatientStorageStartdate() {
		return outpatientStorageStartdate;
	}

	public void setOutpatientStorageStartdate(String outpatientStorageStartdate) {
		this.outpatientStorageStartdate = outpatientStorageStartdate;
	}

	public String getOutpatientStorageUsedate() {
		return outpatientStorageUsedate;
	}

	public void setOutpatientStorageUsedate(String outpatientStorageUsedate) {
		this.outpatientStorageUsedate = outpatientStorageUsedate;
	}

	
	
	
}